﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using MMITDomain.Abstract;
using MMITDomain.Entities;

namespace MMITWeb.Models
{
    //KYC Customer Details required here..
    public class RegisterViewModel
    {
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
        
        [Required]
        [StringLength(200, ErrorMessage="Please provide First Name", MinimumLength=1)]
        [DataType(DataType.Text)]
        [Display(Name = "First Name")]
        public string Firstname { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "Please provide Middle Name", MinimumLength = 1)]
        [DataType(DataType.Text)]
        [Display(Name = "Middle Name")]
        public string Middlename { get; set; }

        [Required]
        [StringLength(20, ErrorMessage = "Please provide Last Name", MinimumLength = 1)]
        [DataType(DataType.Text)]
        [Display(Name = "Last Name")]
        public string Lastname { get; set; }

        [Required(ErrorMessage = "Please enter a valid country code")]
        [Display(Name= "Enter country dialling code")]
        [StringLength(5)]
        public string CountryCode
        {
            get;
            set;
        }
        
        [StringLength(11, ErrorMessage="The Mobile Number must not be more than 11 digits" , MinimumLength=8)]
        [DataType(DataType.PhoneNumber)]
        [Display(Name = "Mobile")]
        public string Mobile { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email address")]
        public string Email { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Identification Number")]
        public string IdentificationNumber
        {
            get;
            set;
        }

        
        public IEnumerable<Telerik.Web.Mvc.UI.DropDownItem> Countries
        {
            get;
            set;
        }

        
        public IEnumerable<Telerik.Web.Mvc.UI.DropDownItem> IdentificationTypes
        {
            get;
            set;
        }

        public string Sex
        {
            get;
            set;

        }
    }
}